﻿@using GameSchool.Models
@model IEnumerable<GameSchool.Models.Person>

@{
    ViewBag.Title = "Notendur";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<script src="@Url.Content("~/Scripts/Person.js")" type="text/javascript"></script>

<h2>Notendur</h2>

<table>
    <tr>
        <th>
            Nafn
        </th>
        <th>
            Notendanafn
        </th>
        <th>
            Nánar..
        </th>
    </tr>

@foreach (var item in (IEnumerable<Person>) ViewData["PersonList"])
{
    <tr class="person_list_item_@(item.Username)">
        <td>
            @Html.DisplayFor(modelItem => item.Fullname)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Username)
        </td>
		<td >
			<span class="ui-icon ui-icon-gear person_action_details" id="person_action_details_@(item.Username)" style="float:left;cursor:pointer;"></span>
		</td>

    </tr>
    <tr style="display:none;" class="person_list_item_@(item.Username)" id="person_details_@(item.Username)">
        <td colspan="3">
            @{
                 Html.RenderPartial("PersonDetails", item);
		    }
		</td>
    </tr>
}
</table>
